home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / E-G / Field Effects.cpt / Field Effects / stack.txt < prev   
Text File  |  1989-02-26  |  6KB  |  228 lines

  1. -- stack: in
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x0 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 1
  11. -- first background id: 2803
  12. -- card count: 2
  13. -- first card id: 2841
  14. -- list block id: 3518
  15. -- print block id: 0
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 0
  19. -- free size: 0 bytes
  20. -- total size: 15520 bytes
  21. -- stack block size: 5632 bytes
  22. -- created by hypercard version: 0x00000000
  23. -- compacted by hypercard version: 0x00000000
  24. -- modified by hypercard version: 0x00000000
  25. -- opened by hypercard version: 0x00000000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on NewField
  69.   set lockscreen to "true"
  70.   if the optionKey = "down"
  71.   then
  72.   set the Style of the target to "scrolling"
  73. else
  74.   set the Style of the target to "rectangle"
  75. end if
  76. set lockscreen to "false"
  77. if the commandKey = "up"
  78. then
  79. put the script of card field "rectSave" of card 1 into it
  80. set the script of the target to it
  81. end if
  82. choose browse tool
  83. end NewField
  84. on NewButton
  85.   if the commandKey = "up"
  86.   then
  87.   put the script of button "Funny" of card 1 into it
  88.   set the script of the target to it
  89. end if
  90. end NewButton
  91. on rectchange
  92.   global bigRect
  93.   If the commandKey = down
  94.   then
  95.   set the lockText of the target to "true"
  96.   put item 2 of the rect of the target into top
  97.   put item 3 of the rect of the target into right
  98.   put item 4 of the rect of the target into bottom
  99.   put item 1 of the rect of the target into left
  100.  
  101.   put item 1 of the loc of the target - left into midh
  102.   put item 2 of the loc of the target - top into midv
  103.  
  104.   if (item 2 of the clickLoc - 15) ‚⧠top
  105.   then
  106.   if item 1 of the clickLoc ‚â• (right - 40)
  107.   then
  108.   put card field "rectSave" of card 1 into it
  109.   put the name of the target into ref
  110.   if ref contains "card field" then put the id of this card before ref
  111.   if the rect of the target ‚↠bigRect
  112.   then
  113.   put "no" into check
  114.   repeat with x = 1 to the number of lines of it
  115.     if line x of it contains ref
  116.     then
  117.     put ref&","&the rect of the target into line x of it
  118.     put "yes" into check
  119.     exit repeat
  120.   end if
  121. end repeat
  122. if check = "no"
  123. then
  124. put return & ref&","& the rect of the target after it
  125. end if
  126. set the rect of the target to bigRect
  127. else
  128.   repeat with x = 1 to the number of lines of it
  129.     if line x of it contains ref
  130.     then
  131.     set the rect of the target to item 2 to 5 of line x of it
  132.     delete line x of it
  133.     exit repeat
  134.   end if
  135. end repeat
  136. end if
  137. put it into card field "rectSave" of card 1
  138. else
  139.   repeat until the commandKey ‚↠"down"
  140.     put item 2 of the mouseLoc into newtop
  141.     put item 1 of the mouseLoc into newleft
  142.     set the loc of the target to midh + newleft,midv + newtop
  143.  
  144.   end repeat
  145. end if
  146. else
  147.   if (item 2 of the clickLoc + 15) ‚â• bottom
  148.   then
  149.   if item 1 of the clickLoc ‚â• (right - 40)
  150.   then
  151.   repeat until the commandKey ‚↠"down"
  152.     put item 1 of the mouseLoc into newright
  153.     put item 2 of the mouseLoc into newbottom
  154.     set the rect of the target to left,top,newright,newbottom
  155.   end repeat
  156. else
  157.   if item 1 of the clickloc ‚⧠left + 40
  158.   then
  159.   hide the target
  160.   wait until the mouseClick
  161.   show the target
  162. end if
  163. end if
  164. end if
  165. end if
  166. else
  167.   if the optionKey = "down"
  168.   then
  169.   repeat until the optionKey = "up"
  170.     choose field tool
  171.     click at the mouseloc
  172.     if the ShiftKey = "up" then DoMenu "Bring Closer"
  173.     if the ShiftKey = "down" then DoMenu "Send Farther"
  174.     choose browse tool
  175.   end repeat
  176. end if
  177. end if
  178. end rectchange
  179. on buttonmove
  180.   if the commandKey = "down"
  181.   then
  182.   repeat until the commandkey = "up"
  183.     set the loc of the target to the mouseloc
  184.   end repeat
  185. end if
  186. if the optionkey = "down"
  187. then
  188. choose button tool
  189. click at the loc of the target
  190. repeat until the optionKey ‚↠"down"
  191.   if the ShiftKey = "down" then DoMenu "Send Farther"
  192.   else DoMenu "Bring Closer"
  193. end repeat
  194. choose browse tool
  195. else
  196.   if the ShiftKey = "down"
  197.   then
  198.   hide the target
  199.   wait until the mouseClick
  200.   show the target
  201. end if
  202. end if
  203. end buttonmove
  204.  
  205.  
  206. on closeField
  207.   global bigRect
  208.   if the rect of the target = bigRect
  209.   then
  210.   set lockScreen to true
  211.   put card field "rectSave"of card 1 into it
  212.   put the name of the target into ref
  213.   if ref contains "card field" then put the id of this card before ref
  214.  
  215.   repeat with x = 1 to the number of lines of it
  216.     if line x of it contains ref
  217.     then
  218.     set the rect of the target to item 2 to 5 of line x of it
  219.     exit repeat
  220.   end if
  221. end repeat
  222. set lockScreen to false
  223. end if
  224. pass closeField
  225. end closeField
  226.  
  227.  
  228.